export type Method = 'GET' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH' | 'PURGE';

export type ResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';

export type responseEncoding =
    | 'ascii'
    | 'ASCII'
    | 'ansi'
    | 'ANSI'
    | 'binary'
    | 'BINARY'
    | 'base64'
    | 'BASE64'
    | 'base64url'
    | 'BASE64URL'
    | 'hex'
    | 'HEX'
    | 'latin1'
    | 'LATIN1'
    | 'ucs-2'
    | 'UCS-2'
    | 'ucs2'
    | 'UCS2'
    | 'utf-8'
    | 'UTF-8'
    | 'utf8'
    | 'UTF8'
    | 'utf16le'
    | 'UTF16LE';
export interface BaseRequestConfig {
    url?: string;
    baseUrl?: string;
    method?: Method;
    baseURL?: string;
    params?: any;
    timeout?: number;
    withCredentials?: boolean;
    headers?: Record<string, any>;
    responseType?: ResponseType;
    responseEncoding?: responseEncoding | string;
    onUploadProgress?: (progressEvent: any) => void;
    onDownloadProgress?: (progressEvent: any) => void;
    maxContentLength?: number;
    maxConcurrent?: number;
    useXhr?: boolean;
    withRequestIntercepter?: boolean;
    withResponseIntercepter?: boolean;
}

export interface BaseResponse<T = any, D = any> {
    data: T;
    status: number;
    statusText: string;
    headers?: Record<string, any>;
    request?: D;
}
export type KAnyObject = Record<string, any>;

export type AnyValue = any;
